-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Use ArgAction::Set
for enable-offchain-indexing flag
#12521
Use ArgAction::Set
for enable-offchain-indexing flag
#12521
Conversation
ArgAction::Set
for enable-offchain-indexingArgAction::Set
for enable-offchain-indexing flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any other places where people might have reasonably used the --arg=true
form? Maybe we should do this everywhere? (I'm not necessarily suggesting we should; just thinking out loud.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to indicate that --flag=true
is deprecated (when used)?
I think this is a non-issue for our other flags. I investigated a bit and this specific flag has specified a
We could take a look at the raw arguments and look for this specifically, but there is no clap-specific way to look for this. |
bot merge |
Follow up for #12381
There are some places where we pass
enable-offchain-indexing=true
to binaries.This does not work by default anymore in clap 4 which uses
ArgAction::SetTrue
as default. This means that the occurence of the flag sets the value to true and additional values are not allowed.While I think the new approach makes more sense, there are some users of this flag and we should not break it if not necessary.